<template>
  <div>
    <h3>主应用</h3>
    <p @click="go('/app-vite')">跳转到子应用</p>
    <div>
      <router-view></router-view>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";
import { useRouter } from "vue-router";

export default defineComponent({
  setup() {
    let router = useRouter()
    let go = (url: string) => {
      router.push(url)
    }
    return {
      go
    }
  }

});
</script>

<style scoped>
p {
  cursor: pointer;
}
</style>
